{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/ddoukhan/testina/lib/python3.5/site-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.\n",
      "  from ._conv import register_converters as _register_converters\n",
      "Using TensorFlow backend.\n"
     ]
    }
   ],
   "source": [
    "# Load the API (Current warning is related to h5py and has no consequences)\n",
    "from inaSpeechSegmenter import Segmenter, seg2csv"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "# select a media to analyse\n",
    "# any media supported by ffmpeg may be used (video, audio, urls)\n",
    "media = '/pcie/MyRepere/wav/BFMTV_CultureEtVous_2012-10-16_064700.wav'"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/ddoukhan/testina/lib/python3.5/site-packages/keras/models.py:291: UserWarning: Error in loading the saved optimizer state. As a result, your model is starting with a freshly initialized optimizer.\n",
      "  warnings.warn('Error in loading the saved optimizer '\n"
     ]
    }
   ],
   "source": [
    "# create an instance of speech segmenter\n",
    "# this loads neural networks and may last few seconds\n",
    "# Warnings have no incidence on the results\n",
    "seg = Segmenter()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/ddoukhan/testina/lib/python3.5/site-packages/skimage/util/shape.py:247: RuntimeWarning: Cannot provide views on a non-contiguous input array without copying.\n",
      "  warn(RuntimeWarning(\"Cannot provide views on a non-contiguous input \"\n"
     ]
    }
   ],
   "source": [
    "# segmentation is performed using the __call__ method of the segmenter instance\n",
    "segmentation = seg(media)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[('Music', 0.0, 17.3), ('Female', 17.3, 27.2), ('Music', 27.22, 28.46), ('NOACTIVITY', 28.48, 29.0), ('Music', 29.0, 35.84), ('Male', 35.84, 37.2), ('Music', 37.22, 43.12), ('Male', 43.12, 44.76), ('Music', 44.78, 46.86), ('Male', 46.86, 52.72), ('Music', 52.74, 58.0), ('NOACTIVITY', 58.02, 58.980000000000004), ('Music', 58.980000000000004, 66.56), ('Male', 66.56, 68.88), ('NOACTIVITY', 68.92, 69.52), ('Music', 69.52, 73.28), ('NOACTIVITY', 73.3, 74.46000000000001), ('Male', 74.46000000000001, 76.34), ('Female', 76.34, 115.86), ('Male', 115.86, 128.46), ('Female', 128.46, 140.5), ('NOACTIVITY', 140.54, 141.26), ('Male', 141.26, 145.72), ('Female', 145.72, 164.9), ('Male', 164.9, 166.08), ('Female', 166.08, 221.64000000000001), ('NOACTIVITY', 221.68, 222.28), ('Male', 222.28, 234.08), ('Female', 234.08, 244.20000000000002), ('NOACTIVITY', 244.24, 246.96), ('Female', 246.96, 250.46), ('NOACTIVITY', 250.5, 251.5), ('Male', 251.5, 260.62), ('Female', 260.62, 277.28000000000003), ('Male', 277.28000000000003, 284.94), ('Female', 284.94, 287.1), ('Male', 287.1, 289.12), ('Female', 289.12, 296.38), ('Male', 296.38, 311.56), ('Female', 311.56, 318.46), ('NOACTIVITY', 318.5, 319.78000000000003), ('Music', 319.78000000000003, 321.02), ('Female', 321.02, 324.24), ('Music', 324.26, 330.58), ('Male', 330.58, 335.44), ('Female', 335.44, 343.42), ('Music', 343.44, 347.82), ('Female', 347.82, 351.08), ('Male', 351.08, 384.02), ('Female', 384.02, 390.84000000000003), ('Male', 390.84000000000003, 420.08), ('Female', 420.08, 421.76), ('Male', 421.76, 428.5), ('Female', 428.5, 434.08), ('Male', 434.08, 443.62), ('Music', 443.64, 446.48), ('Male', 446.48, 450.14), ('Music', 450.16, 459.66), ('Female', 459.66, 464.16), ('Male', 464.16, 483.94), ('Female', 483.94, 489.90000000000003), ('Male', 489.90000000000003, 496.76), ('Music', 496.78000000000003, 505.0), ('Female', 505.0, 508.12), ('Male', 508.12, 509.3), ('Female', 509.3, 539.24), ('NOACTIVITY', 539.28, 539.7), ('Female', 539.7, 563.32), ('Music', 563.34, 568.52), ('NOACTIVITY', 568.54, 568.96), ('Music', 568.96, 572.72), ('NOACTIVITY', 572.74, 573.64), ('Female', 573.64, 576.1), ('Male', 576.1, 584.82), ('Female', 584.82, 590.28), ('Male', 590.28, 593.52), ('NOACTIVITY', 593.5600000000001, 594.08), ('Music', 594.08, 623.0600000000001), ('NOACTIVITY', 623.08, 624.32), ('Music', 624.32, 632.48), ('Male', 632.48, 651.82), ('NOACTIVITY', 651.86, 652.36), ('Male', 652.36, 664.14), ('Female', 664.14, 667.46), ('Male', 667.46, 673.12), ('Female', 673.12, 674.78), ('Male', 674.78, 676.34), ('NOACTIVITY', 676.38, 676.92), ('Music', 676.92, 704.82), ('Male', 704.82, 706.0600000000001), ('NOACTIVITY', 706.1, 707.48), ('Music', 707.48, 714.2), ('Male', 714.2, 722.42), ('Music', 722.44, 725.22), ('Male', 725.22, 731.08), ('Music', 731.1, 736.36), ('NOACTIVITY', 736.38, 737.64), ('Music', 737.64, 741.4), ('NOACTIVITY', 741.42, 742.16), ('Male', 742.16, 751.52), ('Female', 751.52, 760.4), ('Male', 760.4, 768.34), ('Female', 768.34, 777.78), ('Male', 777.78, 790.32), ('Female', 790.32, 796.02), ('Male', 796.02, 810.24), ('Music', 810.26, 818.12), ('Male', 818.12, 829.36), ('Female', 829.36, 841.36), ('NOACTIVITY', 841.4, 843.28), ('Male', 843.28, 884.32), ('NOACTIVITY', 884.36, 884.78), ('Male', 884.78, 901.08), ('Female', 901.08, 907.26), ('NOACTIVITY', 907.3000000000001, 908.1), ('Female', 908.1, 924.5), ('Male', 924.5, 932.44), ('Female', 932.44, 942.52), ('Male', 942.52, 951.36), ('Female', 951.36, 960.48), ('NOACTIVITY', 960.52, 961.34), ('Male', 961.34, 967.5600000000001), ('NOACTIVITY', 967.6, 968.02), ('Male', 968.02, 1003.4), ('Female', 1003.4, 1013.9200000000001), ('NOACTIVITY', 1013.96, 1014.66), ('Male', 1014.66, 1064.78), ('NOACTIVITY', 1064.82, 1065.28), ('Male', 1065.28, 1086.3600000000001), ('Female', 1086.3600000000001, 1092.3600000000001), ('Male', 1092.3600000000001, 1108.74), ('Female', 1108.74, 1119.98), ('NOACTIVITY', 1120.02, 1120.58), ('Male', 1120.58, 1143.02), ('NOACTIVITY', 1143.06, 1143.46), ('Male', 1143.46, 1144.64), ('NOACTIVITY', 1144.68, 1145.1200000000001), ('Male', 1145.1200000000001, 1206.3600000000001), ('Female', 1206.3600000000001, 1215.1200000000001), ('NOACTIVITY', 1215.16, 1216.06), ('Male', 1216.06, 1250.6200000000001), ('NOACTIVITY', 1250.66, 1251.76), ('Male', 1251.76, 1304.06), ('NOACTIVITY', 1304.1000000000001, 1304.52), ('Male', 1304.52, 1324.72), ('Female', 1324.72, 1329.06), ('Male', 1329.06, 1339.5), ('Female', 1339.5, 1345.78), ('Male', 1345.78, 1357.74), ('NOACTIVITY', 1357.78, 1358.46), ('Female', 1358.46, 1365.32), ('Male', 1365.32, 1370.4), ('Female', 1370.4, 1379.42), ('Male', 1379.42, 1388.6000000000001), ('Female', 1388.6000000000001, 1396.2), ('Male', 1396.2, 1406.42), ('Female', 1406.42, 1411.5), ('Male', 1411.5, 1422.94), ('Female', 1422.94, 1443.28), ('Male', 1443.28, 1461.4), ('Female', 1461.4, 1466.28), ('NOACTIVITY', 1466.32, 1466.8600000000001), ('Male', 1466.8600000000001, 1476.16), ('NOACTIVITY', 1476.2, 1476.72), ('Male', 1476.72, 1480.26), ('Female', 1480.26, 1493.3), ('NOACTIVITY', 1493.34, 1493.78), ('Male', 1493.78, 1509.9), ('Female', 1509.9, 1518.82), ('Male', 1518.82, 1542.68), ('NOACTIVITY', 1542.72, 1543.46), ('Female', 1543.46, 1551.2), ('Male', 1551.2, 1552.0), ('Music', 1552.02, 1553.76), ('Female', 1553.76, 1558.56), ('Music', 1558.58, 1563.9), ('Male', 1563.9, 1661.6200000000001), ('NOACTIVITY', 1661.66, 1662.54), ('Music', 1662.54, 1667.52), ('Female', 1667.52, 1672.46), ('Male', 1672.46, 1679.42), ('Female', 1679.42, 1696.6000000000001), ('NOACTIVITY', 1696.64, 1697.38), ('Male', 1697.38, 1740.38), ('NOACTIVITY', 1740.42, 1740.82), ('Male', 1740.82, 1766.4), ('Female', 1766.4, 1773.46), ('NOACTIVITY', 1773.5, 1774.44), ('Male', 1774.44, 1822.26), ('Female', 1822.26, 1831.5), ('NOACTIVITY', 1831.54, 1832.94), ('Male', 1832.94, 1857.8), ('NOACTIVITY', 1857.8400000000001, 1858.38), ('Female', 1858.38, 1865.9), ('Male', 1865.9, 1871.08), ('Female', 1871.08, 1890.96), ('NOACTIVITY', 1891.0, 1892.54), ('Male', 1892.54, 1895.98), ('NOACTIVITY', 1896.02, 1896.7), ('Male', 1896.7, 1913.38), ('NOACTIVITY', 1913.42, 1913.98), ('Female', 1913.98, 1946.38), ('Male', 1946.38, 1951.82), ('Female', 1951.82, 1984.74), ('Male', 1984.74, 2001.3400000000001), ('Female', 2001.3400000000001, 2012.06), ('Male', 2012.06, 2047.5800000000002), ('NOACTIVITY', 2047.6200000000001, 2048.06), ('Male', 2048.06, 2172.52), ('NOACTIVITY', 2172.56, 2173.02), ('Male', 2173.02, 2174.4)]\n"
     ]
    }
   ],
   "source": [
    "# the result is a list of tuples\n",
    "# each tuple contains:\n",
    "# * label in 'Male', 'Female', 'Music', 'NOACTIVITY'\n",
    "# * start time of the segment\n",
    "# * end time of the segment\n",
    "print(segmentation)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [],
   "source": [
    "# this writes the resulting segmentation into a csvfile\n",
    "# the csv file may be used to import segmentation into visualization softwares,\n",
    "# such as sonic-visualiser: https://www.sonicvisualiser.org\n",
    "seg2csv(segmentation, 'myseg.csv')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Music\t0.000000\t17.300000\r\n",
      "Female\t17.300000\t27.200000\r\n",
      "Music\t27.220000\t28.460000\r\n",
      "NOACTIVITY\t28.480000\t29.000000\r\n",
      "Music\t29.000000\t35.840000\r\n",
      "Male\t35.840000\t37.200000\r\n",
      "Music\t37.220000\t43.120000\r\n",
      "Male\t43.120000\t44.760000\r\n",
      "Music\t44.780000\t46.860000\r\n",
      "Male\t46.860000\t52.720000\r\n",
      "Music\t52.740000\t58.000000\r\n",
      "NOACTIVITY\t58.020000\t58.980000\r\n",
      "Music\t58.980000\t66.560000\r\n",
      "Male\t66.560000\t68.880000\r\n",
      "NOACTIVITY\t68.920000\t69.520000\r\n",
      "Music\t69.520000\t73.280000\r\n",
      "NOACTIVITY\t73.300000\t74.460000\r\n",
      "Male\t74.460000\t76.340000\r\n",
      "Female\t76.340000\t115.860000\r\n",
      "Male\t115.860000\t128.460000\r\n",
      "Female\t128.460000\t140.500000\r\n",
      "NOACTIVITY\t140.540000\t141.260000\r\n",
      "Male\t141.260000\t145.720000\r\n",
      "Female\t145.720000\t164.900000\r\n",
      "Male\t164.900000\t166.080000\r\n",
      "Female\t166.080000\t221.640000\r\n",
      "NOACTIVITY\t221.680000\t222.280000\r\n",
      "Male\t222.280000\t234.080000\r\n",
      "Female\t234.080000\t244.200000\r\n",
      "NOACTIVITY\t244.240000\t246.960000\r\n",
      "Female\t246.960000\t250.460000\r\n",
      "NOACTIVITY\t250.500000\t251.500000\r\n",
      "Male\t251.500000\t260.620000\r\n",
      "Female\t260.620000\t277.280000\r\n",
      "Male\t277.280000\t284.940000\r\n",
      "Female\t284.940000\t287.100000\r\n",
      "Male\t287.100000\t289.120000\r\n",
      "Female\t289.120000\t296.380000\r\n",
      "Male\t296.380000\t311.560000\r\n",
      "Female\t311.560000\t318.460000\r\n",
      "NOACTIVITY\t318.500000\t319.780000\r\n",
      "Music\t319.780000\t321.020000\r\n",
      "Female\t321.020000\t324.240000\r\n",
      "Music\t324.260000\t330.580000\r\n",
      "Male\t330.580000\t335.440000\r\n",
      "Female\t335.440000\t343.420000\r\n",
      "Music\t343.440000\t347.820000\r\n",
      "Female\t347.820000\t351.080000\r\n",
      "Male\t351.080000\t384.020000\r\n",
      "Female\t384.020000\t390.840000\r\n",
      "Male\t390.840000\t420.080000\r\n",
      "Female\t420.080000\t421.760000\r\n",
      "Male\t421.760000\t428.500000\r\n",
      "Female\t428.500000\t434.080000\r\n",
      "Male\t434.080000\t443.620000\r\n",
      "Music\t443.640000\t446.480000\r\n",
      "Male\t446.480000\t450.140000\r\n",
      "Music\t450.160000\t459.660000\r\n",
      "Female\t459.660000\t464.160000\r\n",
      "Male\t464.160000\t483.940000\r\n",
      "Female\t483.940000\t489.900000\r\n",
      "Male\t489.900000\t496.760000\r\n",
      "Music\t496.780000\t505.000000\r\n",
      "Female\t505.000000\t508.120000\r\n",
      "Male\t508.120000\t509.300000\r\n",
      "Female\t509.300000\t539.240000\r\n",
      "NOACTIVITY\t539.280000\t539.700000\r\n",
      "Female\t539.700000\t563.320000\r\n",
      "Music\t563.340000\t568.520000\r\n",
      "NOACTIVITY\t568.540000\t568.960000\r\n",
      "Music\t568.960000\t572.720000\r\n",
      "NOACTIVITY\t572.740000\t573.640000\r\n",
      "Female\t573.640000\t576.100000\r\n",
      "Male\t576.100000\t584.820000\r\n",
      "Female\t584.820000\t590.280000\r\n",
      "Male\t590.280000\t593.520000\r\n",
      "NOACTIVITY\t593.560000\t594.080000\r\n",
      "Music\t594.080000\t623.060000\r\n",
      "NOACTIVITY\t623.080000\t624.320000\r\n",
      "Music\t624.320000\t632.480000\r\n",
      "Male\t632.480000\t651.820000\r\n",
      "NOACTIVITY\t651.860000\t652.360000\r\n",
      "Male\t652.360000\t664.140000\r\n",
      "Female\t664.140000\t667.460000\r\n",
      "Male\t667.460000\t673.120000\r\n",
      "Female\t673.120000\t674.780000\r\n",
      "Male\t674.780000\t676.340000\r\n",
      "NOACTIVITY\t676.380000\t676.920000\r\n",
      "Music\t676.920000\t704.820000\r\n",
      "Male\t704.820000\t706.060000\r\n",
      "NOACTIVITY\t706.100000\t707.480000\r\n",
      "Music\t707.480000\t714.200000\r\n",
      "Male\t714.200000\t722.420000\r\n",
      "Music\t722.440000\t725.220000\r\n",
      "Male\t725.220000\t731.080000\r\n",
      "Music\t731.100000\t736.360000\r\n",
      "NOACTIVITY\t736.380000\t737.640000\r\n",
      "Music\t737.640000\t741.400000\r\n",
      "NOACTIVITY\t741.420000\t742.160000\r\n",
      "Male\t742.160000\t751.520000\r\n",
      "Female\t751.520000\t760.400000\r\n",
      "Male\t760.400000\t768.340000\r\n",
      "Female\t768.340000\t777.780000\r\n",
      "Male\t777.780000\t790.320000\r\n",
      "Female\t790.320000\t796.020000\r\n",
      "Male\t796.020000\t810.240000\r\n",
      "Music\t810.260000\t818.120000\r\n",
      "Male\t818.120000\t829.360000\r\n",
      "Female\t829.360000\t841.360000\r\n",
      "NOACTIVITY\t841.400000\t843.280000\r\n",
      "Male\t843.280000\t884.320000\r\n",
      "NOACTIVITY\t884.360000\t884.780000\r\n",
      "Male\t884.780000\t901.080000\r\n",
      "Female\t901.080000\t907.260000\r\n",
      "NOACTIVITY\t907.300000\t908.100000\r\n",
      "Female\t908.100000\t924.500000\r\n",
      "Male\t924.500000\t932.440000\r\n",
      "Female\t932.440000\t942.520000\r\n",
      "Male\t942.520000\t951.360000\r\n",
      "Female\t951.360000\t960.480000\r\n",
      "NOACTIVITY\t960.520000\t961.340000\r\n",
      "Male\t961.340000\t967.560000\r\n",
      "NOACTIVITY\t967.600000\t968.020000\r\n",
      "Male\t968.020000\t1003.400000\r\n",
      "Female\t1003.400000\t1013.920000\r\n",
      "NOACTIVITY\t1013.960000\t1014.660000\r\n",
      "Male\t1014.660000\t1064.780000\r\n",
      "NOACTIVITY\t1064.820000\t1065.280000\r\n",
      "Male\t1065.280000\t1086.360000\r\n",
      "Female\t1086.360000\t1092.360000\r\n",
      "Male\t1092.360000\t1108.740000\r\n",
      "Female\t1108.740000\t1119.980000\r\n",
      "NOACTIVITY\t1120.020000\t1120.580000\r\n",
      "Male\t1120.580000\t1143.020000\r\n",
      "NOACTIVITY\t1143.060000\t1143.460000\r\n",
      "Male\t1143.460000\t1144.640000\r\n",
      "NOACTIVITY\t1144.680000\t1145.120000\r\n",
      "Male\t1145.120000\t1206.360000\r\n",
      "Female\t1206.360000\t1215.120000\r\n",
      "NOACTIVITY\t1215.160000\t1216.060000\r\n",
      "Male\t1216.060000\t1250.620000\r\n",
      "NOACTIVITY\t1250.660000\t1251.760000\r\n",
      "Male\t1251.760000\t1304.060000\r\n",
      "NOACTIVITY\t1304.100000\t1304.520000\r\n",
      "Male\t1304.520000\t1324.720000\r\n",
      "Female\t1324.720000\t1329.060000\r\n",
      "Male\t1329.060000\t1339.500000\r\n",
      "Female\t1339.500000\t1345.780000\r\n",
      "Male\t1345.780000\t1357.740000\r\n",
      "NOACTIVITY\t1357.780000\t1358.460000\r\n",
      "Female\t1358.460000\t1365.320000\r\n",
      "Male\t1365.320000\t1370.400000\r\n",
      "Female\t1370.400000\t1379.420000\r\n",
      "Male\t1379.420000\t1388.600000\r\n",
      "Female\t1388.600000\t1396.200000\r\n",
      "Male\t1396.200000\t1406.420000\r\n",
      "Female\t1406.420000\t1411.500000\r\n",
      "Male\t1411.500000\t1422.940000\r\n",
      "Female\t1422.940000\t1443.280000\r\n",
      "Male\t1443.280000\t1461.400000\r\n",
      "Female\t1461.400000\t1466.280000\r\n",
      "NOACTIVITY\t1466.320000\t1466.860000\r\n",
      "Male\t1466.860000\t1476.160000\r\n",
      "NOACTIVITY\t1476.200000\t1476.720000\r\n",
      "Male\t1476.720000\t1480.260000\r\n",
      "Female\t1480.260000\t1493.300000\r\n",
      "NOACTIVITY\t1493.340000\t1493.780000\r\n",
      "Male\t1493.780000\t1509.900000\r\n",
      "Female\t1509.900000\t1518.820000\r\n",
      "Male\t1518.820000\t1542.680000\r\n",
      "NOACTIVITY\t1542.720000\t1543.460000\r\n",
      "Female\t1543.460000\t1551.200000\r\n",
      "Male\t1551.200000\t1552.000000\r\n",
      "Music\t1552.020000\t1553.760000\r\n",
      "Female\t1553.760000\t1558.560000\r\n",
      "Music\t1558.580000\t1563.900000\r\n",
      "Male\t1563.900000\t1661.620000\r\n",
      "NOACTIVITY\t1661.660000\t1662.540000\r\n",
      "Music\t1662.540000\t1667.520000\r\n",
      "Female\t1667.520000\t1672.460000\r\n",
      "Male\t1672.460000\t1679.420000\r\n",
      "Female\t1679.420000\t1696.600000\r\n",
      "NOACTIVITY\t1696.640000\t1697.380000\r\n",
      "Male\t1697.380000\t1740.380000\r\n",
      "NOACTIVITY\t1740.420000\t1740.820000\r\n",
      "Male\t1740.820000\t1766.400000\r\n",
      "Female\t1766.400000\t1773.460000\r\n",
      "NOACTIVITY\t1773.500000\t1774.440000\r\n",
      "Male\t1774.440000\t1822.260000\r\n",
      "Female\t1822.260000\t1831.500000\r\n",
      "NOACTIVITY\t1831.540000\t1832.940000\r\n",
      "Male\t1832.940000\t1857.800000\r\n",
      "NOACTIVITY\t1857.840000\t1858.380000\r\n",
      "Female\t1858.380000\t1865.900000\r\n",
      "Male\t1865.900000\t1871.080000\r\n",
      "Female\t1871.080000\t1890.960000\r\n",
      "NOACTIVITY\t1891.000000\t1892.540000\r\n",
      "Male\t1892.540000\t1895.980000\r\n",
      "NOACTIVITY\t1896.020000\t1896.700000\r\n",
      "Male\t1896.700000\t1913.380000\r\n",
      "NOACTIVITY\t1913.420000\t1913.980000\r\n",
      "Female\t1913.980000\t1946.380000\r\n",
      "Male\t1946.380000\t1951.820000\r\n",
      "Female\t1951.820000\t1984.740000\r\n",
      "Male\t1984.740000\t2001.340000\r\n",
      "Female\t2001.340000\t2012.060000\r\n",
      "Male\t2012.060000\t2047.580000\r\n",
      "NOACTIVITY\t2047.620000\t2048.060000\r\n",
      "Male\t2048.060000\t2172.520000\r\n",
      "NOACTIVITY\t2172.560000\t2173.020000\r\n",
      "Male\t2173.020000\t2174.400000\r\n"
     ]
    }
   ],
   "source": [
    "# Here is the resulting CSV\n",
    "!cat myseg.csv"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.5.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
